import request from '@/utils/request'

// 查询信审记录列表
export function creditReviewList(query) {
    return request({
        url: '/creditReview/creditReview/list',
        method: 'get',
        params: query
    })
}

// 查询信审记录列表
export function creditReviewlistDetails(query) {
    return request({
        url: '/creditReview/creditReview/listDetails',
        method: 'get',
        params: query
    })
}


// 导出信审记录列表
export function creditReviewExport(data) {
    return request({
        url: '/creditReview/creditReview/export',
        method: 'post',
        data: data
    })
}

// 获取信审记录详细信息
export function creditReviewDetail(id) {
    return request({
        url: `/creditReview/creditReview/getInfo/${id}`,
        method: 'get'
    })
}

// 受理
export function acceptance(ids) {
    return request({
        url: `/creditReview/creditReview/acceptance/${ids}`,
        method: 'put',
        // data:data
    })
}

// 改派
export function reassignment(data) {
    return request({
        url: '/creditReview/creditReview/reassignment',
        method: 'put',
        data: data
    })
}

// 准入/不予准入
export function access(data) {
    return request({
        url: '/creditReview/creditReview/access',
        method: 'put',
        data: data
    })
}

// 发起补充资料
export function initiateAddFiles(data) {
    return request({
        url: '/creditReview/creditReview/initiateAddFiles',
        method: 'put',
        data: data
    })
}

// 提交信审批复建议
export function submitSuggestions(data) {
    return request({
        url: '/creditReview/creditReview/submitSuggestions',
        method: 'put',
        data: data
    })
}

// 提交信审结果
export function submitCreditReviewResults(data) {
    return request({
        url: '/creditReview/creditReview/submitCreditReviewResults',
        method: 'put',
        data: data
    })
}

// 批复建议列表
export function approvalSuggestions(applicationNo) {
    return request({
        url: `/creditReview/creditReview/approvalSuggestions/${applicationNo}`,
        method: 'get'
    })
}

// 批复建议详情
export function approvalSuggestionsDetails(applicationNo) {
    return request({
        url: `/creditReview/creditReview/approvalSuggestionsDetails/${applicationNo}`,
        method: 'get'
    })
}


// 作废剩余额度
export function voidOrCancelTheOrder(data) {
    return request({
        url: '/creditReview/creditReview/voidOrCancelTheOrder',
        method: 'post',
        data: data
    })
}

// 信审记录统计
export function statistics(query) {
    return request({
        url: '/creditReview/creditReview/statistics',
        method: 'get',
        params: query
    })
}

// 审核
export function audit(data) {
    return request({
        url: '/creditReview/creditReview/audit',
        method: 'post',
        data: data
    })
}

// 查询历史记录
export function getFlowRecord(id) {
    return request({
        url: `/creditReview/creditReview/getFlowRecord/${id}`,
        method: 'get'
    })
}


// 免信审记录列表
export function notCreditReviewList(query) {
    return request({
        url: '/creditReview/creditReview/notCreditReviewList',
        method: 'get',
        params: query
    })
}

// 免信审记录统计
export function noCreditStatistics(query) {
    return request({
        url: '/creditReview/creditReview/noCreditStatistics',
        method: 'get',
        params: query
    })
}

// 批复建议列表
export function quotaOrderMap(calcSchemeCode) {
    return request({
        url: `/order/order/quotaOrderMap/${calcSchemeCode}`,
        method: 'get'
    })
}

// 改派人员
export function getCreditReviewPersonnel(calcSchemeCode) {
    return request({
        url: `/creditReview/creditReview/getCreditReviewPersonnel`,
        method: 'get'
    })
}


